package link.hwx.service.oa.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import link.hwx.entity.oa.OaBillInfoVo;
import link.hwx.mapper.oa.OaPoAgreementMapper;
import link.hwx.service.oa.OaPoAgreementService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@DS("OAData")
@Service
public class OaPoAgreementServiceImpl implements OaPoAgreementService {

    @Autowired
    private OaPoAgreementMapper oaPoAgreementMapper;

    @Override
    public OaBillInfoVo findPoAgreementByRequestId(String poAgreementMainTableName, String requestid) {
        return oaPoAgreementMapper.findPoAgreementByRequestId(poAgreementMainTableName, requestid);
    }

    @Override
    public int updatePoAgreementSrmDocNoByRequestId(String poAgreementMainTableName, String requestid, String srmdocno) {
        return oaPoAgreementMapper.updatePoAgreementSrmDocNoByRequestId(poAgreementMainTableName, requestid, srmdocno);
    }

    @Override
    public List<OaBillInfoVo> findPoAgreementByDocnoType(String poAgreementMainTableName, String srmdocno, String nodeType) {
        return oaPoAgreementMapper.findPoAgreementByDocnoType(poAgreementMainTableName, srmdocno, nodeType);
    }
}
